#ifndef wu_FILM_XML_SHAPE_H
#define wu_FILM_XML_SHAPE_H

#pragma once
#include "wuFilmXML.h"
#include "ofxBox2d.h"
#include "wuGrayImg.h"
#include "ofxFBOTexture.h"

class wuFilmXMLShape : public wuFilmXML
{
    public:
        wuFilmXMLShape();
        ~wuFilmXMLShape();

		void setup( string _filename, ofxBox2d * _box2d, int _vw, int _vh, vector <wuSkin> * _skins, bool _bAuto=false);
		void update();
		void draw(bool pinta_bg=false, int _offX=0);
		void FindShape();
		void makeFBO();
        void setNowScrollOffset(int _scroll);
        void clear();
        ofPoint getPosition();

		ofxBox2d * box2d;
        vector <ofxBox2dPolygon>	polyLines;		  //	the box2d polygon/line shape

		wuGrayImg 				grayDiff;
		ofxCvContourFinder		contour;
        ofRectangle rect;
		// Texture mix
		ofxFBOTexture myFBO;

		bool bShape;

		int vw, vh, scrollNowOffset;
};
#endif

